<%--
  Created by IntelliJ IDEA.
  User: feng
  Date: 2023/5/11
  Time: 11:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>体育馆管理</title>
    <meta name="description" content="体育馆管理">
    <meta name="keywords" content="体育馆管理">
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
    <!-- 引入样式 -->
    <link rel="stylesheet" href="<%=request.getContextPath()%>/resources/plugins/elementui/index.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/resourcesplugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/resources/css/style.css">
    <script src="<%=request.getContextPath()%>/resources/js/axios-0.18.0.js"></script>
    <style type="text/css">
        .el-main{
            position: absolute;
            top: 70px;
            bottom: 0px;
            left: 200px;
            right: 10px;
            padding: 0;
        }
    </style>
</head>
<body class="hold-transition skin-purple sidebar-mini">
<div id="app">
    <el-container>
        <el-header  class="main-header" style="height:70px;">
            <nav class="navbar navbar-static-top" :class=''>
                <!-- Logo -->
                <a href="#" class="logo" style="text-align:center">
                    <span class="logo-lg">体育管理系统</span>
                </a>
                <div class="right-menu">
                    <el-dropdown class="avatar-container right-menu-item" trigger="click">
                        <div class="avatar-wrapper">
                            <img src="<%=request.getContextPath()%>/resources/img/user2-160x160.jpg" class="user-avatar">
                            <!--展示用户名-->
                            {{username}}
                        </div>
                        <el-dropdown-menu slot="dropdown">
                            <el-dropdown-item divided>
                                <span style="display:block;" >修改密码</span>
                            </el-dropdown-item>
                            <el-dropdown-item divided>
                                <span style="display:block;"><a href="<%=request.getContextPath()%>/login/logout">退出登录</a></span>
                            </el-dropdown-item>
                        </el-dropdown-menu>
                    </el-dropdown>
                </div>
            </nav>
        </el-header>
        <el-container>
            <el-aside width="200px">
                <el-menu>
                    <el-submenu v-for="menu in menuList" :index="menu.path">
                        <template slot="title">
                            <i class="fa" :class="menu.icon"></i>
                            {{menu.title}}
                        </template>
                        <template v-for="child in menu.children">
                            <el-menu-item :index="child.path">
                                <a :href="child.linkUrl" target="right">{{child.title}}</a>
                            </el-menu-item>
                        </template>
                    </el-submenu>
                </el-menu>
            </el-aside>
            <el-container>
                <iframe name="right" class="el-main" src="<%=request.getContextPath()%>/resources/img/gdouGym.jpg" width="100%" height="580px" frameborder="0"></iframe>
            </el-container>
        </el-container>
    </el-container>
</div>
</body>
<!-- 引入组件库 -->
<script src="<%=request.getContextPath()%>/resources/js/vue.js"></script>
<script src="<%=request.getContextPath()%>/resources/plugins/elementui/index.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/resources/js/jquery.min.js"></script>
<script>
    new Vue({
        el: '#app',
        data:{
            username:null,//用户名
            menuList:[
                {
                    "path": "1",
                    "title": "预约申请",
                    "icon":"fa-dashboard",
                    "children": [
                        {
                            "path": "/1-1",
                            "title": "场地预约",
                            "linkUrl":"<%=request.getContextPath()%>/denueHireMessage/toAppSite",
                            "children":[]
                        },
                        {
                            "path": "/1-2",
                            "title": "器材预约",
                            "linkUrl":"<%=request.getContextPath()%>/equipmentRent/toEquipmentRent",
                            "children":[]
                        },
                        {
                            "path": "/1-3",
                            "title": "赛事详情",
                            "linkUrl":"<%=request.getContextPath()%>/competition/toUserCompetition",
                            "children":[]
                        },
                    ]
                },
                {
                    "path": "2",
                    "title": "我的预约",
                    "icon":"fa-user-md",
                    "children": [
                        {
                            "path": "/2-1",
                            "title": "场地预约",
                            "linkUrl":"<%=request.getContextPath()%>/record/roUserAppSiteAdmin",
                            "children":[]
                        },
                        {
                            "path": "/2-2",
                            "title": "器材预约",
                            "linkUrl":"<%=request.getContextPath()%>/record/toUserEquipmentRentAdmin",
                            "children":[]
                        },

                    ]
                },
                {
                    "path": "4",
                    "title": "赛事管理",
                    "icon":"fa-user-md",
                    "children": [
                        /*{
                            "path": "/4-1",
                            "title": "基础管理",
                            "linkUrl":"<%=request.getContextPath()%>/game/toFindGame",
                            "children":[]
                        },
                        {
                            "path": "/4-2",
                            "title": "赛事审批",
                            "linkUrl":"<%=request.getContextPath()%>/game/toFindGameCheck",
                            "children":[]
                        },*/
                        /*{
                            "path": "/4-3",
                            "title": "预约管理",
                            "linkUrl":"<%=request.getContextPath()%>/game/toGameAppAdmin",
                            "children":[]
                        },*/
                        {
                            "path": "/4-4",
                            "title": "比赛管理",
                            "linkUrl":"<%=request.getContextPath()%>/competition/toCompetition",
                            "children":[]
                        },
                    ]
                },
                {
                    "path": "7",
                    "title": "账号管理",
                    "icon":"fa-user-md",
                    "children": [
                        {
                            "path": "/7-1",
                            "title": "基础信息",
                            "linkUrl":"<%=request.getContextPath()%>/record/toUserMess",
                            "children":[]
                        },
                        {
                            "path": "/7-2",
                            "title": "密码修改",
                            "linkUrl":"<%=request.getContextPath()%>/record/toChangePass",
                            "children":[]
                        },
                    ]
                },
                {
                    "path": "8",
                    "title": "关于我们",
                    "icon":"fa-user-md",
                    "children": [
                        {
                            "path": "/8-1",
                            "title": "体育馆介绍",
                            "linkUrl":"<%=request.getContextPath()%>/aboutUs/toAboutUs",
                            "children":[]
                        },
                    ]
                },
            ]
        },
        created(){
            //发送请求获取当前登录用户的用户名
            this.username = sessionStorage.getItem("username");
        }
    });
    $(function() {
        var wd = 200;
        $(".el-main").css('width', $('body').width() - wd + 'px');
    });
</script>
</html>

